# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details.

pkgname=windapsearch
pkgver=28.7724ec4
pkgrel=8
pkgdesc='Script to enumerate users, groups and computers from a Windows domain through LDAP queries.'
arch=('any')
groups=('blackarch' 'blackarch-recon')
url='https://github.com/ropnop/windapsearch'
license=('GPL3')
depends=('python' 'python-pyasn1' 'python-pyasn1-modules' 'python-ldap')
makedepends=('git')
source=("git+https://github.com/ropnop/$pkgname.git")
sha512sums=('SKIP')

pkgver() {
  cd $pkgname

  echo $(git rev-list --count HEAD).$(git rev-parse --short HEAD)
}

package() {
  cd $pkgname

  install -dm 755 "$pkgdir/usr/bin"

  install -Dm 755 "$pkgname.py" "$pkgdir/usr/bin/$pkgname"
  install -Dm 644 -t "$pkgdir/usr/share/doc/$pkgname/" README.md
}

